﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;

namespace MvcApplication5.Common
{
    public class MyController : Controller
    {
        protected override void OnActionExecuting(ActionExecutingContext filterContext)
        {
            base.OnActionExecuting(filterContext);

            if (AppContext.Current.LoginUser.employee_code == "") {
                AppContext.Current.HttpResponse.Redirect("/Admin/Login", true);
            }
        }
    }
}